home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MACD 5
/
MACD 5.bin
/
workbench
/
tools
/
czesc_4
/
smallmath
/
source
/
source.doc
< prev
next >
Wrap
Text File
|
1993-01-24
|
1KB
|
29 lines
DAcos.a: Double-precision IEEE ArcCosine function.
SAcos.a: Single-precision IEEE ArcCosine function.
DPow.a: Double-precision IEEE Power function.
SPow.a: Single-precision IEEE Power function.
DTst.a: Double-precision IEEE Test against zero.
DCmp.a: Double-precision IEEE Compare of two numbers.
These are basic examples of the source code for these libraries. Most of
the functions are nearly identical to the ACos() function -- just change
the FACOS to FSIN or whatever. The Pow() functions are the most interesting
ones (I think). The DTst and DCmp functions are implemented as integer
operations without the coprocessor, since (if I added correctly) even a
worst-case path through them is faster than using the coprocessor. (This
may be surprising, but keep in mind that to use the coprocessor you have to
push and pop the arguments to and from the stack.) If anyone can write
faster routines, let me know... The code is probably confusing, owing to
spaghetti-coding on my part, but (knock wood) it works and is fast.
The formation into a resident library was done using SAS/C 6.0. The code
was assembled with the SAS-supplied assembler asm. As far as I can tell,
the SAS libent.a and libinit.c code are not freely distributable, and so
are not included.
Laz Marhenke
laz@leland.stanford.edu